package project_part2;

import static org.junit.Assert.*;

import org.junit.Test;

public class FindMatchTestGenerated2 {
	
	static final int DOB_BIT = 8;
	// static final int A_BIT = 8;
	static final int W_BIT = 4;
	static final int H_BIT = 2;
	static final int G_BIT = 1;
@Test
public void testCrit1Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(1);
Contact con2 = setMatch(1);
Contact res[] = null;
MatchCriteria mc = setCriteria(1,false);
int outcome = 0;
if(sumBits(1) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit1Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(1);
Contact con2 = setMatch(1);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(1,false);
int outcome = 0;
if(sumBits(1) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit1Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(1);
Contact con2 = setMatch(1);
Contact res[] = null;
MatchCriteria mc = setCriteria(1,false);
int outcome = 0;
if(sumBits(1) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit1Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(1);
Contact con2 = setMatch(1);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(1,false);
int outcome = 0;
if(sumBits(1) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit1Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(1);
Contact con2 = setMatch(1);
Contact res[] = null;
MatchCriteria mc = setCriteria(1,false);
int outcome = 0;
if(sumBits(1) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit1Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(1);
Contact con2 = setMatch(1);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(1,false);
int outcome = 0;
if(sumBits(1) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit1Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(1);
Contact con2 = setMatch(1);
Contact res[] = null;
MatchCriteria mc = setCriteria(1,false);
int outcome = 0;
if(sumBits(1) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit1Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(1);
Contact con2 = setMatch(1);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(1,false);
int outcome = 0;
if(sumBits(1) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit2Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(2);
Contact con2 = setMatch(2);
Contact res[] = null;
MatchCriteria mc = setCriteria(2,false);
int outcome = 0;
if(sumBits(2) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit2Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(2);
Contact con2 = setMatch(2);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(2,false);
int outcome = 0;
if(sumBits(2) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit2Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(2);
Contact con2 = setMatch(2);
Contact res[] = null;
MatchCriteria mc = setCriteria(2,false);
int outcome = 0;
if(sumBits(2) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit2Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(2);
Contact con2 = setMatch(2);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(2,false);
int outcome = 0;
if(sumBits(2) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit2Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(2);
Contact con2 = setMatch(2);
Contact res[] = null;
MatchCriteria mc = setCriteria(2,false);
int outcome = 0;
if(sumBits(2) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit2Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(2);
Contact con2 = setMatch(2);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(2,false);
int outcome = 0;
if(sumBits(2) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit2Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(2);
Contact con2 = setMatch(2);
Contact res[] = null;
MatchCriteria mc = setCriteria(2,false);
int outcome = 0;
if(sumBits(2) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit2Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(2);
Contact con2 = setMatch(2);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(2,false);
int outcome = 0;
if(sumBits(2) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit3Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(3);
Contact con2 = setMatch(3);
Contact res[] = null;
MatchCriteria mc = setCriteria(3,false);
int outcome = 0;
if(sumBits(3) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit3Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(3);
Contact con2 = setMatch(3);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(3,false);
int outcome = 0;
if(sumBits(3) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit3Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(3);
Contact con2 = setMatch(3);
Contact res[] = null;
MatchCriteria mc = setCriteria(3,false);
int outcome = 0;
if(sumBits(3) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit3Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(3);
Contact con2 = setMatch(3);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(3,false);
int outcome = 0;
if(sumBits(3) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit3Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(3);
Contact con2 = setMatch(3);
Contact res[] = null;
MatchCriteria mc = setCriteria(3,false);
int outcome = 0;
if(sumBits(3) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit3Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(3);
Contact con2 = setMatch(3);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(3,false);
int outcome = 0;
if(sumBits(3) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit3Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(3);
Contact con2 = setMatch(3);
Contact res[] = null;
MatchCriteria mc = setCriteria(3,false);
int outcome = 0;
if(sumBits(3) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit3Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(3);
Contact con2 = setMatch(3);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(3,false);
int outcome = 0;
if(sumBits(3) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit4Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(4);
Contact con2 = setMatch(4);
Contact res[] = null;
MatchCriteria mc = setCriteria(4,false);
int outcome = 0;
if(sumBits(4) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit4Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(4);
Contact con2 = setMatch(4);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(4,false);
int outcome = 0;
if(sumBits(4) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit4Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(4);
Contact con2 = setMatch(4);
Contact res[] = null;
MatchCriteria mc = setCriteria(4,false);
int outcome = 0;
if(sumBits(4) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit4Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(4);
Contact con2 = setMatch(4);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(4,false);
int outcome = 0;
if(sumBits(4) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit4Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(4);
Contact con2 = setMatch(4);
Contact res[] = null;
MatchCriteria mc = setCriteria(4,false);
int outcome = 0;
if(sumBits(4) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit4Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(4);
Contact con2 = setMatch(4);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(4,false);
int outcome = 0;
if(sumBits(4) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit4Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(4);
Contact con2 = setMatch(4);
Contact res[] = null;
MatchCriteria mc = setCriteria(4,false);
int outcome = 0;
if(sumBits(4) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit4Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(4);
Contact con2 = setMatch(4);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(4,false);
int outcome = 0;
if(sumBits(4) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit5Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(5);
Contact con2 = setMatch(5);
Contact res[] = null;
MatchCriteria mc = setCriteria(5,false);
int outcome = 0;
if(sumBits(5) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit5Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(5);
Contact con2 = setMatch(5);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(5,false);
int outcome = 0;
if(sumBits(5) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit5Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(5);
Contact con2 = setMatch(5);
Contact res[] = null;
MatchCriteria mc = setCriteria(5,false);
int outcome = 0;
if(sumBits(5) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit5Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(5);
Contact con2 = setMatch(5);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(5,false);
int outcome = 0;
if(sumBits(5) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit5Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(5);
Contact con2 = setMatch(5);
Contact res[] = null;
MatchCriteria mc = setCriteria(5,false);
int outcome = 0;
if(sumBits(5) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit5Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(5);
Contact con2 = setMatch(5);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(5,false);
int outcome = 0;
if(sumBits(5) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit5Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(5);
Contact con2 = setMatch(5);
Contact res[] = null;
MatchCriteria mc = setCriteria(5,false);
int outcome = 0;
if(sumBits(5) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit5Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(5);
Contact con2 = setMatch(5);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(5,false);
int outcome = 0;
if(sumBits(5) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit6Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(6);
Contact con2 = setMatch(6);
Contact res[] = null;
MatchCriteria mc = setCriteria(6,false);
int outcome = 0;
if(sumBits(6) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit6Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(6);
Contact con2 = setMatch(6);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(6,false);
int outcome = 0;
if(sumBits(6) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit6Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(6);
Contact con2 = setMatch(6);
Contact res[] = null;
MatchCriteria mc = setCriteria(6,false);
int outcome = 0;
if(sumBits(6) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit6Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(6);
Contact con2 = setMatch(6);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(6,false);
int outcome = 0;
if(sumBits(6) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit6Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(6);
Contact con2 = setMatch(6);
Contact res[] = null;
MatchCriteria mc = setCriteria(6,false);
int outcome = 0;
if(sumBits(6) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit6Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(6);
Contact con2 = setMatch(6);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(6,false);
int outcome = 0;
if(sumBits(6) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit6Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(6);
Contact con2 = setMatch(6);
Contact res[] = null;
MatchCriteria mc = setCriteria(6,false);
int outcome = 0;
if(sumBits(6) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit6Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(6);
Contact con2 = setMatch(6);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(6,false);
int outcome = 0;
if(sumBits(6) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit7Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(7);
Contact con2 = setMatch(7);
Contact res[] = null;
MatchCriteria mc = setCriteria(7,false);
int outcome = 0;
if(sumBits(7) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit7Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(7);
Contact con2 = setMatch(7);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(7,false);
int outcome = 0;
if(sumBits(7) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit7Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(7);
Contact con2 = setMatch(7);
Contact res[] = null;
MatchCriteria mc = setCriteria(7,false);
int outcome = 0;
if(sumBits(7) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit7Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(7);
Contact con2 = setMatch(7);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(7,false);
int outcome = 0;
if(sumBits(7) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit7Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(7);
Contact con2 = setMatch(7);
Contact res[] = null;
MatchCriteria mc = setCriteria(7,false);
int outcome = 0;
if(sumBits(7) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit7Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(7);
Contact con2 = setMatch(7);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(7,false);
int outcome = 0;
if(sumBits(7) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit7Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(7);
Contact con2 = setMatch(7);
Contact res[] = null;
MatchCriteria mc = setCriteria(7,false);
int outcome = 0;
if(sumBits(7) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit7Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(7);
Contact con2 = setMatch(7);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(7,false);
int outcome = 0;
if(sumBits(7) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit8Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(8);
Contact con2 = setMatch(8);
Contact res[] = null;
MatchCriteria mc = setCriteria(8,false);
int outcome = 0;
if(sumBits(8) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit8Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(8);
Contact con2 = setMatch(8);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(8,false);
int outcome = 0;
if(sumBits(8) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit8Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(8);
Contact con2 = setMatch(8);
Contact res[] = null;
MatchCriteria mc = setCriteria(8,false);
int outcome = 0;
if(sumBits(8) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit8Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(8);
Contact con2 = setMatch(8);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(8,false);
int outcome = 0;
if(sumBits(8) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit8Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(8);
Contact con2 = setMatch(8);
Contact res[] = null;
MatchCriteria mc = setCriteria(8,false);
int outcome = 0;
if(sumBits(8) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit8Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(8);
Contact con2 = setMatch(8);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(8,false);
int outcome = 0;
if(sumBits(8) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit8Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(8);
Contact con2 = setMatch(8);
Contact res[] = null;
MatchCriteria mc = setCriteria(8,false);
int outcome = 0;
if(sumBits(8) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit8Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(8);
Contact con2 = setMatch(8);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(8,false);
int outcome = 0;
if(sumBits(8) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit9Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(9);
Contact con2 = setMatch(9);
Contact res[] = null;
MatchCriteria mc = setCriteria(9,false);
int outcome = 0;
if(sumBits(9) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit9Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(9);
Contact con2 = setMatch(9);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(9,false);
int outcome = 0;
if(sumBits(9) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit9Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(9);
Contact con2 = setMatch(9);
Contact res[] = null;
MatchCriteria mc = setCriteria(9,false);
int outcome = 0;
if(sumBits(9) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit9Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(9);
Contact con2 = setMatch(9);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(9,false);
int outcome = 0;
if(sumBits(9) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit9Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(9);
Contact con2 = setMatch(9);
Contact res[] = null;
MatchCriteria mc = setCriteria(9,false);
int outcome = 0;
if(sumBits(9) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit9Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(9);
Contact con2 = setMatch(9);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(9,false);
int outcome = 0;
if(sumBits(9) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit9Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(9);
Contact con2 = setMatch(9);
Contact res[] = null;
MatchCriteria mc = setCriteria(9,false);
int outcome = 0;
if(sumBits(9) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit9Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(9);
Contact con2 = setMatch(9);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(9,false);
int outcome = 0;
if(sumBits(9) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit10Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(10);
Contact con2 = setMatch(10);
Contact res[] = null;
MatchCriteria mc = setCriteria(10,false);
int outcome = 0;
if(sumBits(10) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit10Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(10);
Contact con2 = setMatch(10);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(10,false);
int outcome = 0;
if(sumBits(10) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit10Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(10);
Contact con2 = setMatch(10);
Contact res[] = null;
MatchCriteria mc = setCriteria(10,false);
int outcome = 0;
if(sumBits(10) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit10Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(10);
Contact con2 = setMatch(10);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(10,false);
int outcome = 0;
if(sumBits(10) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit10Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(10);
Contact con2 = setMatch(10);
Contact res[] = null;
MatchCriteria mc = setCriteria(10,false);
int outcome = 0;
if(sumBits(10) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit10Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(10);
Contact con2 = setMatch(10);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(10,false);
int outcome = 0;
if(sumBits(10) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit10Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(10);
Contact con2 = setMatch(10);
Contact res[] = null;
MatchCriteria mc = setCriteria(10,false);
int outcome = 0;
if(sumBits(10) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit10Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(10);
Contact con2 = setMatch(10);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(10,false);
int outcome = 0;
if(sumBits(10) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit11Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(11);
Contact con2 = setMatch(11);
Contact res[] = null;
MatchCriteria mc = setCriteria(11,false);
int outcome = 0;
if(sumBits(11) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit11Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(11);
Contact con2 = setMatch(11);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(11,false);
int outcome = 0;
if(sumBits(11) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit11Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(11);
Contact con2 = setMatch(11);
Contact res[] = null;
MatchCriteria mc = setCriteria(11,false);
int outcome = 0;
if(sumBits(11) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit11Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(11);
Contact con2 = setMatch(11);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(11,false);
int outcome = 0;
if(sumBits(11) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit11Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(11);
Contact con2 = setMatch(11);
Contact res[] = null;
MatchCriteria mc = setCriteria(11,false);
int outcome = 0;
if(sumBits(11) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit11Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(11);
Contact con2 = setMatch(11);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(11,false);
int outcome = 0;
if(sumBits(11) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit11Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(11);
Contact con2 = setMatch(11);
Contact res[] = null;
MatchCriteria mc = setCriteria(11,false);
int outcome = 0;
if(sumBits(11) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit11Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(11);
Contact con2 = setMatch(11);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(11,false);
int outcome = 0;
if(sumBits(11) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit12Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(12);
Contact con2 = setMatch(12);
Contact res[] = null;
MatchCriteria mc = setCriteria(12,false);
int outcome = 0;
if(sumBits(12) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit12Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(12);
Contact con2 = setMatch(12);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(12,false);
int outcome = 0;
if(sumBits(12) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit12Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(12);
Contact con2 = setMatch(12);
Contact res[] = null;
MatchCriteria mc = setCriteria(12,false);
int outcome = 0;
if(sumBits(12) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit12Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(12);
Contact con2 = setMatch(12);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(12,false);
int outcome = 0;
if(sumBits(12) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit12Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(12);
Contact con2 = setMatch(12);
Contact res[] = null;
MatchCriteria mc = setCriteria(12,false);
int outcome = 0;
if(sumBits(12) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit12Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(12);
Contact con2 = setMatch(12);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(12,false);
int outcome = 0;
if(sumBits(12) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit12Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(12);
Contact con2 = setMatch(12);
Contact res[] = null;
MatchCriteria mc = setCriteria(12,false);
int outcome = 0;
if(sumBits(12) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit12Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(12);
Contact con2 = setMatch(12);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(12,false);
int outcome = 0;
if(sumBits(12) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit13Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(13);
Contact con2 = setMatch(13);
Contact res[] = null;
MatchCriteria mc = setCriteria(13,false);
int outcome = 0;
if(sumBits(13) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit13Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(13);
Contact con2 = setMatch(13);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(13,false);
int outcome = 0;
if(sumBits(13) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit13Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(13);
Contact con2 = setMatch(13);
Contact res[] = null;
MatchCriteria mc = setCriteria(13,false);
int outcome = 0;
if(sumBits(13) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit13Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(13);
Contact con2 = setMatch(13);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(13,false);
int outcome = 0;
if(sumBits(13) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit13Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(13);
Contact con2 = setMatch(13);
Contact res[] = null;
MatchCriteria mc = setCriteria(13,false);
int outcome = 0;
if(sumBits(13) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit13Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(13);
Contact con2 = setMatch(13);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(13,false);
int outcome = 0;
if(sumBits(13) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit13Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(13);
Contact con2 = setMatch(13);
Contact res[] = null;
MatchCriteria mc = setCriteria(13,false);
int outcome = 0;
if(sumBits(13) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit13Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(13);
Contact con2 = setMatch(13);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(13,false);
int outcome = 0;
if(sumBits(13) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit14Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(14);
Contact con2 = setMatch(14);
Contact res[] = null;
MatchCriteria mc = setCriteria(14,false);
int outcome = 0;
if(sumBits(14) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit14Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(14);
Contact con2 = setMatch(14);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(14,false);
int outcome = 0;
if(sumBits(14) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit14Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(14);
Contact con2 = setMatch(14);
Contact res[] = null;
MatchCriteria mc = setCriteria(14,false);
int outcome = 0;
if(sumBits(14) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit14Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(14);
Contact con2 = setMatch(14);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(14,false);
int outcome = 0;
if(sumBits(14) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit14Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(14);
Contact con2 = setMatch(14);
Contact res[] = null;
MatchCriteria mc = setCriteria(14,false);
int outcome = 0;
if(sumBits(14) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit14Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(14);
Contact con2 = setMatch(14);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(14,false);
int outcome = 0;
if(sumBits(14) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit14Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(14);
Contact con2 = setMatch(14);
Contact res[] = null;
MatchCriteria mc = setCriteria(14,false);
int outcome = 0;
if(sumBits(14) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit14Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(14);
Contact con2 = setMatch(14);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(14,false);
int outcome = 0;
if(sumBits(14) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit15Thresh1true() {
ContactList clist = new ContactList();
Contact con = setContact(15);
Contact con2 = setMatch(15);
Contact res[] = null;
MatchCriteria mc = setCriteria(15,false);
int outcome = 0;
if(sumBits(15) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit15Thresh1false() {
ContactList clist = new ContactList();
Contact con = setContact(15);
Contact con2 = setMatch(15);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(15,false);
int outcome = 0;
if(sumBits(15) >= 1 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 1);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit15Thresh2true() {
ContactList clist = new ContactList();
Contact con = setContact(15);
Contact con2 = setMatch(15);
Contact res[] = null;
MatchCriteria mc = setCriteria(15,false);
int outcome = 0;
if(sumBits(15) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit15Thresh2false() {
ContactList clist = new ContactList();
Contact con = setContact(15);
Contact con2 = setMatch(15);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(15,false);
int outcome = 0;
if(sumBits(15) >= 2 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 2);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit15Thresh3true() {
ContactList clist = new ContactList();
Contact con = setContact(15);
Contact con2 = setMatch(15);
Contact res[] = null;
MatchCriteria mc = setCriteria(15,false);
int outcome = 0;
if(sumBits(15) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit15Thresh3false() {
ContactList clist = new ContactList();
Contact con = setContact(15);
Contact con2 = setMatch(15);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(15,false);
int outcome = 0;
if(sumBits(15) >= 3 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 3);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
@Test
public void testCrit15Thresh4true() {
ContactList clist = new ContactList();
Contact con = setContact(15);
Contact con2 = setMatch(15);
Contact res[] = null;
MatchCriteria mc = setCriteria(15,false);
int outcome = 0;
if(sumBits(15) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(outcome,res.length);
}
@Test
public void testCrit15Thresh4false() {
ContactList clist = new ContactList();
Contact con = setContact(15);
Contact con2 = setMatch(15);
Contact res[] = null;
MatchCriteria mc = setCriteriaInv(15,false);
int outcome = 0;
if(sumBits(15) >= 4 )
outcome = 1;
else
outcome = 0;
clist.add(con2);
res = clist.findMatches(con, mc, 4);
System.out.println("*************************");
System.out.println(con);
System.out.println(mc);
System.out.println(outcome);
System.out.println("-------------------------");
assertEquals(0,res.length);
}
public Contact setContact(int num) {
	Contact c;

	String DOB = "10/10/2007";
	short weight = 200;
	int height = 5;
	Gender gender = Gender.FEMALE;

	if ((DOB_BIT & num) == 8)
		DOB = "10/10/2001";
	// if ((A_BIT & i) == 1)
	// age = 100;
	if ((W_BIT & num) == 4)
		weight = 100;
	if ((H_BIT & num) == 2)
		height = 6;
	if ((G_BIT & num) == 1)
		gender = Gender.MALE;

	c = new Contact("T", "T", "T", DOB);
	c.setWeight(weight);
	c.setHeight(height, height);
	c.setGender(gender);

	return c;
}

public Contact setMatch(int num) {
	Contact c;

	String DOB = "10/10/2007";
	short weight = 200;
	int height = 5;
	Gender gender = Gender.FEMALE;

	if ((DOB_BIT & num) == 8)
		DOB = "10/10/2001";
	// if ((A_BIT & i) == 1)
	// age = 100;
	if ((W_BIT & num) == 4)
		weight = 100;
	if ((H_BIT & num) == 2)
		height = 6;
	if ((G_BIT & num) == 1)
		gender = Gender.MALE;

	c = new Contact("F", "T", "T", DOB);
	c.setWeight(weight);
	c.setHeight(height, height);
	c.setGender(gender);

	return c;
}


public MatchCriteria setCriteria(int num, boolean inv) {
	MatchCriteria mc = new MatchCriteria();

	Gender gender = Gender.FEMALE;


		mc.ageHigh = 6;
		mc.ageLow = 4;
		mc.matchAge = inv;

		mc.weightHigh = 250;
		mc.weightLow = 150;
		mc.matchWeight = inv;

		mc.heightHigh = new ContactHeight(5, 8);
		mc.heightLow = new ContactHeight(5, 2);
		mc.matchHeight = inv;

		gender = Gender.FEMALE;
		mc.matchGender = inv;


	if ((DOB_BIT & num) == 8) {
		mc.ageHigh = 12;
		mc.ageLow = 10;
		mc.matchAge = true;
	}
	if ((W_BIT & num) == 4) {
		mc.weightHigh = 150;
		mc.weightLow = 50;
		mc.matchWeight = true;
	}
	if ((H_BIT & num) == 2) {
		mc.heightHigh = new ContactHeight(6, 9);
		mc.heightLow = new ContactHeight(6, 3);
		mc.matchHeight = true;
	}
	if ((G_BIT & num) == 1) {
		gender = Gender.MALE;
		mc.matchGender = true;
	}

	mc.addGender(gender);
	return mc;
}

public MatchCriteria setCriteriaInv(int num, boolean inv) {
	MatchCriteria mc = new MatchCriteria();

	Gender gender = Gender.FEMALE;


		mc.ageHigh = 12;
		mc.ageLow = 10;
		mc.matchAge = inv;

		mc.weightHigh = 150;
		mc.weightLow = 50;
		mc.matchWeight = inv;

		mc.heightHigh = new ContactHeight(6, 9);
		mc.heightLow = new ContactHeight(6, 3);
		mc.matchHeight = inv;

		gender = Gender.MALE;
		mc.matchGender = inv;


	if ((DOB_BIT & num) == 8) {
		mc.ageHigh = 7;
		mc.ageLow = 2;
		mc.matchAge = true;
	}
	if ((W_BIT & num) == 4) {
		mc.weightHigh = 250;
		mc.weightLow = 150;
		mc.matchWeight = true;
	}
	if ((H_BIT & num) == 2) {
		mc.heightHigh = new ContactHeight(5, 8);
		mc.heightLow = new ContactHeight(5, 2);
		mc.matchHeight = true;
	}
	if ((G_BIT & num) == 1) {
		gender = Gender.FEMALE;
		mc.matchGender = true;
	}

	mc.addGender(gender);
	return mc;
}

public int sumBits(int value) {
	int total = 0;

	if ((1 & value) == 1)
		total++;

	for (int i = 0; i < 31; i++) {
		value = value >> 1;

		if ((1 & value) == 1)
			total++;

	}

	return total;
}

}
